package com.nova.edc.service.energy;

import com.nova.edc.model.energy.Energy;
import com.nova.edc.model.energy.GatherSummary;
import com.nova.edc.model.system.AreaPoint;
import com.nova.edc.model.system.CustomerInfo;
import com.nova.edc.model.util.CountModel;
import com.nova.frame.dao.parsing.SQLParser;
import com.nova.frame.utils.JdbcUtils;
import com.nova.module.sql.SqlBuffer;
import org.apache.axis2.databinding.types.soapencoding.Decimal;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/3/16 0016.
 */
public interface GatherSummaryService {
    List<GatherSummary> findStateTime(Integer state, String date);

    void insertList(List<GatherSummary> list);

    double findEnergyByDatePoint(List<AreaPoint> areaPointList, String startDate, String endDate);

    List<Map<String, Object>> getCostbydevice(int customerInfoId,
                                              String startDate, String endDate);

    // 获取全国的耗电信息
    List<Map<String, Object>> findAllEnergy(String area, Integer searchTimeType);


    List<Map<String, Object>> getEnergyByRegion(int customerinfoId, String startDate, String endDate);

    List<Map<String, Object>> getAllEnergyByDate(int customerinfoId, String startDate, String endDate, int deviceId);

    List<Map<String, Object>> getUnitEnergyByDate(String customerinfoId, String startDate, String endDate);

    List<Map<String, Object>> getEnergyByDate(int customerinfoId, String startDate, String endDate);

    List<Map<String, Object>> getStatisticsByDayCuscomer(CountModel countModel, List<CustomerInfo> customerInfoList);

    int positionInProvince(CustomerInfo customerInfo, String startTime, String endTime);

    List<Map<String, Object>> getGatewayDetail(String searchDate, String gatewayId);

    Map<String, BigDecimal> getStatisticsByDate(Integer customerinfoId, String startDate, String endDate);

    Map<String, BigDecimal> getAllStatistics(List<Integer> customerInfoIds, String startDate, String endDate);

    Map<String, BigDecimal> getUnitStatistics(List<Integer> customerInfoIds, String startDate, String endDate);

    Energy getEnergyByCompany(int customerInfoId, String startDate, String endDate);

    List<Map<String, Object>> getByMapArea(String position, int timeType);

    List<Map<String, Object>> getEnergyByCompanyAPI(List<CustomerInfo> customerInfoList, String startDate, String endDate, String format);

    List<Map<String, Object>> getEnergyByAreaAPI(List<CustomerInfo> customerInfoList, String startDate, String endDate, String areaType, int orderType);
}
